import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import IndexPage from '../views/IndexPage.vue'
import intermediary from  '../views/house/intermediary.vue'
import landlord from  '../views/house/landlord.vue'
import UserList from  '../views/user/UserList.vue'


Vue.use(VueRouter)

const routes = [
  {path: '/', redirect:'/login'},
  {path: '/login', name: '登录', component: Login},
  {path: '/IndexPage', name: '注册', component: IndexPage},
  {path: '/Home', name: '主页面', component: Home,children:[
      {path: '/intermediary', name: '中介列表', component: intermediary},
      {path: '/landlord', name: '房动列表', component: landlord},
      {path: '/UserList', name: '用户列表', component: UserList}
    ]},
]

const router = new VueRouter({
  routes
})

export default router
